package com.joysuch.wwyt.core.exception;

import com.joysuch.wwyt.core.enums.Status;

/**
 * 描述：接口类的业务异常<br>
 * 
 * @author <br>
 * @version 2.2 <br>
 *          日期：2021年04月16日 下午4:00:47
 */
public class ApiCoreException extends Exception {
	private static final long serialVersionUID = 1L;

	private int code;

	public ApiCoreException(Status status) {
		super(status.getMsg());
		this.code = status.getCode();
	}

	public ApiCoreException(int code, String msg) {
		super(msg);
		this.code = code;
	}

	public int getCode() {
		return code;
	}
}
